<?php

use think\facade\Route;

Route::group('api', function () {

    // 短信注册
    Route::post('user/smsRegister', 'api.User/smsRegister');
    // 账号登录
    Route::post('user/accountLogin', 'api.User/accountLogin');
    // 短信登陆
    Route::post('user/smsLogin', 'api.User/smsLogin');
    // 重置密码
    Route::post('user/resetPassword', 'api.User/resetPassword');


    // 需登陆
    Route::group(function () {
        // 个人信息
        Route::get('user/profile', 'api.User/profile');
        // 更新信息
        Route::post('user/update', 'api.User/update');
        Route::post('user/updateMpUserInfo', 'api.User/updateMpUserInfo');
        // 更改密码
        Route::post('user/changePassword', 'api.User/changePassword');
        // 绑定手机号
        Route::post('user/changeMobile', 'api.User/changeMobile');
        // 更换用户名
        Route::post('user/changeUsername', 'api.User/changeUsername');
        // 第三方信息
        Route::get('user/thirdOauth', 'api.User/thirdOauth');
        // 登出
        Route::post('user/logout', 'api.User/logout');
        // 注销
        Route::post('user/logoff', 'api.User/logoff');

        // 资金日志
        Route::get('walletLog', 'api.WalletLog/list');
    })->middleware('check_login', 'user');
});
